<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/27 0027
 * Time: 20:58
 */

namespace app\play\controller;


use Api\Doc\DocController;
use app\common\BaseController;
use app\play\model\Play;


/**
 * @title Api测试
 * @description www_vultr1_com数据库操作
 * @group www_vultr1_com
 */
class Index extends BaseController
{
    /**
     * @title 查询接口
     * @description 根据video_id和from查询play表中数据
     * @author zcx
     * @url /play/group/:video_id
     * @method GET
     * @module play表

     * @param name:video_id type:int require:1 default:1 other: desc:视频id(video表中的id)
     * @param name:from require:0 default: other:get参数 desc:播放源名称
     *
     * @return id:主键
     * @return video_id:视频id
     * @return from:播放源名称
     * @return url:播放地址
     * @return part:第几集
     */
    public function groupById($video_id){
        $from=request()->get("from","");
        $data=Play::groupById($video_id,$from);
        return json($data);
    }

}